#include <stdio.h>
//#include "mysql.h"
#include "TUser.h"
#include <string.h>
#include <uuid/uuid.h>
#include "zvector.h"

void vectortest()
{
	int * i = 0;
	zvector * v1 = NULL;
	zvector_create(&v1, 0);

	//zvector_add(v1, 0)
	for (i = 0; i < 100; i++)
	{
		zvector_add(v1, (void *)i);
		printf("added : count: %d\n", v1->m_Count);
	}	

	zvector_destroy(&v1);
}

//void mathtest()
//{
//	int i = 0;
//	int t = 0;
//	for (i = 0; i < 10000; i++) 
//	{
//		t = zmath_powoftwo(i);
//		printf("%d -- %d\n", i, t);
//	}
//	printf("endof mathtest");
//}

int main()
{
    //MYSQL * conn = NULL;
	//mathtest();
	vectortest();

    TUser u;
    uuid_t uuid;
    uuid_generate(uuid);
    char struuid[36];
    uuid_unparse(uuid, struuid);
    
	//strcpy(u.TU_Guid, "3CA15CDF-60EC-4384-AFA3-4F1E4155C357");
 strcpy(u.TU_Guid, struuid);
	strcpy(u.TU_UserName, "admin");
	strcpy(u.TU_Password, "201705231722");
	u.TU_Age = 29;

	// a multiple logic such as add, although it's a simple logic
	int addir = TUserService_Add(&u);

	printf("the add res is %d!\n", addir);

    printf("201705231723");
    getchar();
    return 0;
}
